package day05;

import java.util.Random;

public class Method {
    /*public static void main(String[] args) {
        say();
        say(2);
        say(3,"6");
    }

    public static void say(){
        System.out.println("Hello World");
    }
    public static void say(int a){
        System.out.println("一共"+a);
    }
    public static void say(int a,String b){
        System.out.println(a+"+"+b);
    }*/
    /*public static void main(String[] args) {
        System.out.println(sum(2,3));
    }

    public static int sum(int a,int b) {
        int sum1 = a+b;
        return sum1;
    }*/
    public static void main(String[] args) {
        int[] d = generateArray(10, 5);
        for (int i = 0; i < d.length; i++) {
            System.out.println(d[i]);
        }

    }
    public static int[] generateArray(int len,int max){
        Random rand = new Random();
        int[] arr = new int[len];
        for(int i=0;i<len;i++){
            arr[i] = rand.nextInt(max+1);
        }
        return arr;
    }
}
